import request from '@/utils/request'

// 获取列表
export function getRoleList(data) {
  return request.get(`/roles?_limit=${data.limit}&_start=${data.start}`)
}

// 添加
export function addRole(data) {
  return request.post('/roles', data)
}

// 角色详情
export function getDeatailRole(id) {
  return request.get(`/roles/${id}`)
}

// 编辑
export function editRole(data) {
  return request.put(`/roles/${data.id}`, data)
}

// 删除
export function delRoleList(id) {
  return request.delete(`/roles/${id}`)
}

// 获取权限
export function getPerList(data) {
  return request.get(`/permissions?_limit=${data.limit}&_start=${data.start}`)
}
